<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 100px;
        }
        .d1{
            background: #999;

            /* 
                border
            */
            /* border-top: 2px solid red;
            border-right: 4px dashed blue;
            border-bottom: 4px dotted green;
            border-left: 3px solid cyan; */

            /* border-width: 2px 4px 4px 3px;
            border-style: solid dashed dotted solid;
            border-color: red blue green cyan; */

            border: 5px solid red;

            /* border-bottom: 1px solid white; */

            /* 
                padding
            */
            /* padding-left: 30px;
            padding-top: 15px;
            padding-right: 10px;
            padding-bottom: 15px; */

            
            /* padding: 10px 20px 30px 40px; */
            /* padding: 10px 20px 30px; */
            /* padding: 10px 20px; */
            padding: 20px;


            /* 
                margin
            */
            /* margin-bottom: 20px;
            margin-left: 30px;
            margin-top: 10px;
            margin-right: 50px; */
            /* margin: 10px 20px 30px 40px; */
            /* margin: 10px 30px; */
            /* margin: 30px; */

            /* 块级元素（盒子）的水平居中  */
            margin: 0 auto;
            /* 文本的水平居中 */
            text-align: center;
            /* 文本的垂直居中 */
            line-height: 100px;
        }
        .d2{
            background: #666;

            /* border-top: 5px solid white; */

            /* margin-top: 30px; */
        }
        .d3{
            background: #333;
        }
    </style>
</head>
<body>
    <div class="d1">
        div1
    </div>
    <div class="d2">
        div2
    </div>
    <div class="d3">
        div3
    </div>
</body>
</html>